package com.spirngcloud.alibabasentinelratelimiting.controller.mq.letter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Objects;

/**
 * @version V1.0
 * @Author 宋聚智
 * @Date 2019/10/24 16:07
 * @description
 * @Modify By：
 * @ModifyTime： 2019/10/24
 * @Modify marker：
 **/
@RestController
public class OrderDelayController {
    @Autowired
    DelaySender delaySender;

    @GetMapping("sendDelay")
    public String sendDelay(){
        Order order1 = new Order();
        order1.setOrderStatus(0);
        order1.setOrderId("123456");
        order1.setOrderName("小米6");

        Order order2 = new Order();
        order2.setOrderStatus(1);
        order2.setOrderId("456789");
        order2.setOrderName("小米8");
        delaySender.sendDelay(order1);
        delaySender.sendDelay(order2);
        return "ok";
    }
}
